<!-- Breadcrums -->
<div class="container">
	<ul id="breadcrumbs">
	<?php foreach ($breadcrumbs as $key => $breadcrumb) { ?>
	<?php if($key == 0) {  ?>
		<li><a href="<?php echo $breadcrumb['href']; ?>"><i class="icon-home"></i></a></li>
		<?php } else { ?>
		<li><a href="<?php echo $breadcrumb['href']; ?>"><?php echo $breadcrumb['text']; ?></a></li>
		<?php } ?>
		<?php } ?>
	</ul>
</div>
<!-- Breadcrum -->
<div class="container">
	<div id="main">
		<div class="row">
			<div class="span9">
				<div class="tabbable tabbable-bordered property-detail-listing">
					<div class="tab-content">
						<div class="review">
							<div class="share"><!-- AddThis Button BEGIN -->
								<div class="addthis_default_style">
									<a class="addthis_button_facebook"></a> 
									<a class="addthis_button_twitter"></a>
									<a class="addthis_button_email"></a>
									<a class="addthis_button_print"></a>
								</div>
								<script type="text/javascript"
									src="//s7.addthis.com/js/250/addthis_widget.js"></script> <!-- AddThis Button END -->
							</div>
						</div>
						<div class="clearfix"></div>
						<h1 class="page-header page-header-listing-detail"><?php echo $listingtoview['ProjectName']; ?>
					</h1>
					
					
					<div id="main-slider" class="flexslider">

							  <ul class="slides">
						
								<li>
						
								  <div class="container flex-caption">
						
									<div class="title">
						
									  <span> 
						
										140 SPRING LANES <br> 
						
										BEVERLY HILLS 	
						
									  </span>
						
									</div>
						
								  </div>
						
								  <img alt="" width="848" height="409" src="<?php base_url(); ?>assets/img/slider/slider1.jpg">
						
								</li>
						
								<li>
						
								  <div class="container flex-caption">
						
									<div class="title">
						
									  <span>
						
										140 SPRING LANES <br>
						
										BEVERLY HILLS
						
									  </span>
						
									</div>
						
								  </div>
						
								  <img alt="" width="848" height="409" src="<?php base_url(); ?>assets/img/slider/slider2.jpg">
						
								</li>
						
								<li>
						
								  <div class="container flex-caption">
						
									<div class="title">
						
									  <span>
						
										140 SPRING LANES <br>
						
										BEVERLY HILLS
						
									  </span>
						
									</div>
						
								  </div>
						
								  <img alt="" width="848" height="409" src="<?php base_url(); ?>assets/img/slider/slider3.jpg">
						
								</li>
						
								<li>
						
								  <div class="container flex-caption">
						
									<div class="title">
						
									  <span>
						
										140 SPRING LANES <br>
						
										BEVERLY HILLS
						
									  </span>
						
									</div>
						
								  </div>
						
								  <img alt="" width="848" height="409" src="<?php base_url(); ?>assets/img/slider/slider4.jpg">
						
								</li>
						
								<li class="flex-active-slide">
						
								  <div class="container flex-caption">
						
									<div class="title">
						
									  <span>
						
										140 SPRING LANES <br>
						
										BEVERLY HILLS
						
									  </span>
						
									</div>
						
								  </div>
						
								  <img alt="" width="848" height="409" src="<?php base_url(); ?>assets/img/slider/slider5.jpg">
						
								</li>
						
							  </ul>
						
							
						</div>
					
					
					
					<!-- /.carousel -->
					<div class="row-fluid">
						<?php if($listingtoview['Price_Min'] > 0) { ?>
						<div class="span4">
							<hr/>
						</div>
						<div class="span4">
							<div class="price">
								<h1 class="boxtitle page-header text-center">
								<?php echo $listingtoview['PriceUnit'] . " " . number_format(($listingtoview['Price_Min']), 0, '.', ','); ?>
								</h1>
							</div>
						</div>
						<div class="span4">
							<hr/>
						</div>
						<?php } else { ?>
						<div class="span3">
							<hr/>
						</div>
						<div class="span6">
							<div class="price">
								<h1 class="boxtitle page-header text-center">Price On Application</h1>
							</div>
						</div>
						<div class="span3">
							<hr/>
						</div>
						<?php } ?>
					</div>
					<div class="property-detail properties-rows">
						<div class="row-fluid">
							<div class="span4">
								<?php 
								//convert currency to USD
								$price_converted_int = $this->helpermodel->price_converttobase(trim($listingtoview['Price_Min']), USD_UNIT);
								?>
								<p class="sepH_a"><span>Estimated USD</span>: <?php echo $price_converted_int; ?></p>
								<p><span>
									<strong>(Guide Price)</strong></span><br/>
									<span><?php echo date('F j, Y', strtotime($listingtoview['ListedOnUtc'])); ?></span>
								</p>
							</div>
							<div class="span8">
								<p class="sepH_a"><strong>Details</strong></p>
								<div class="row-fluid">
									<ul class="span5">
										<li class="">
											<?php echo $listingtoview['PropertyType'] ?> - 99 Years
										</li>
										<li class="">
											<?php if($listingtoview['Price_Min'] > 0) { ?> <?php echo $listingtoview['PriceUnit'] . " " . number_format(($listingtoview['Price_Min']), 0, '.', ','); ?>
											<?php } else { ?> <?php echo "Price On Application"; ?> <?php } ?>
										</li>
									</ul>
									<ul class="span4">
										<li class="">
											<?php echo number_format($listingtoview['Size_Min']) . ' ' . $listingtoview['SizeUnit']; ?>
										</li>
										<li class="">
											<?php 
												//get Tenure Name by Id
											$tenureObj = $this->lookupmodel->getTenure($this->config->item('config_language_id'), $this->config->item('market'), $listingtoview['Listing_ID']);
											$tenureName = isset($tenureObj->Name) ? $tenureObj->Name : "";
											echo $tenureName;
											?>
										</li>
									</ul>
									<ul class="span3 property">
										<div class="control-group">
											<div class="controls">
												<div class="bedrooms sepH_b">
													<div class="content"><?php echo $listingtoview['Bedroom']; ?></div>
												</div>
												<div class="bathrooms sepH_b">
													<div class="content"><?php echo $listingtoview['Bathroom']; ?></div>
												</div>
											</div>
										</div>
									</ul>
								</div>
							</div>
						</div>
					</div>
					<div class="clearfix"></div>
					<div class="property-detail">
						<p class="sepH_a page-header-a"><strong>Overview</strong></p>
						<div class="description">
							<p><?php
							echo $listingtoview['Description']
							?></p>
						</div>
					</div>
					<div class="clearfix"></div>
					<?php if($features && $Facilities) { ?>
					<div class="property-detail" style="padding-left: 0px;">
						<div class="row-fluid">
							<div class="span4">
								<div class="jll-box-header">
									<h3 class="infohead"><?php echo $text_features; ?></h3>
								</div>
								<ul class="span4">
								<?php foreach ($features as $feature) { ?>
									<li class="checked"><?php echo $feature['Name']; ?></li>
									<?php } ?>
								</ul>
							</div>
							<div class="span6">
								<div class="jll-box-header">
									<h3 class="infohead"><?php echo $text_facilities; ?></h3>
								</div>
								<ul class="span8">
								<?php foreach ($Facilities as $facility) { ?>
									<li class="checked"><?php echo $facility['Name']; ?></li>
									<?php } ?>
								</ul>
							</div>
						</div>
					</div>
					<?php } else { ?>
					<?php if($features) { ?>
					<div class="property-detail" style="padding-left: 0px;">
						<div class="row-fluid">
							<div class="span4">
								<div class="jll-box-header">
									<h3 class="infohead"><?php echo $text_features; ?></h3>
								</div>
								<ul class="span4">
								<?php foreach ($features as $feature) { ?>
									<li class="checked"><?php echo $feature['Name']; ?></li>
									<?php } ?>
								</ul>
							</div>
						</div>
					</div>
					<?php } ?>
					<?php if($Facilities) { ?>
					<div class="property-detail" style="padding-left: 0px;">
						<div class="row-fluid">
							<div class="span6">
								<div class="jll-box-header">
									<h3 class="infohead"><?php echo $text_facilities; ?></h3>
								</div>
								<ul class="span8">
								<?php foreach ($Facilities as $facility) { ?>
									<li class="checked"><?php echo $facility['Name']; ?></li>
									<?php } ?>
								</ul>
							</div>
						</div>
					</div>
					<?php } ?>
					<?php } ?> 
					<h3 class="infohead">Map</h3>
					<div class="property-detail">
						<input type="hidden" id="latListing" value="<?php echo $listingtoview['Latitude']; ?>" /> 
						<input type="hidden" id="lngListing" value="<?php echo $listingtoview['Longitude']; ?>" />
						<input type="hidden" id="priceListing" value="<?php if($listingtoview['Price_Min'] > 0) { ?> <?php echo $listingtoview['PriceUnit'] . " " . number_format(($listingtoview['Price_Min']), 0, '.', ','); ?> <?php } else { ?> <?php echo "Price On Application"; ?> <?php } ?>" />
						<input type="hidden" id="areaListing" value="<?php echo number_format($listingtoview['Size_Min']) . ' ' . $listingtoview['SizeUnit']; ?>" />
						<input type="hidden" id="thumbListing" value="<?php echo $thumb; ?>" />
						<input type="hidden" id="titleListing" value="<?php echo $listingtoview['ProjectName']; ?>" />
						<div id="property-map"></div>
					<!-- /#property-map -->
					</div>
					
					<h3 class="infohead">Facebook Comments</h3>
					<div class="property-detail"><?php $this->load->view('helpers/facebook_comments.php'); ?>
					</div>
					</div>
				</div>
			</div>
			<div class="sidebar span3"><?php $this->load->view('helpers/widgets/our-agents.php'); ?>
				<?php $this->load->view('helpers/widgets/contact.php'); ?> 
				<?php $this->load->view('helpers/widgets/similar-properties.php'); ?>
				<?php $this->load->view('helpers/widgets/mostproperties.php'); ?></div>
			</div>
	</div>
</div>
